package com.cmc.cloud.cmclink.doc.vo.specialcargodgvo;

import com.cmc.cloud.cmclink.doc.vo.specialcargocasvo.CasCreateOrUpdateVO;
import com.cmc.cloud.cmclink.doc.vo.specialcargodgpackingvo.PackingCreateOrUpdateVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;

/**
 * 特种货审批dg Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class SpecialCargoDgBaseVO {

    private Long id;

    @Schema(description = "DG临时标识")
    private Long dgLabel;

    @Schema(description = "特种货申请id", requiredMode = Schema.RequiredMode.REQUIRED, example = "32189")
    @NotNull(message = "{SpecialCargoDgBaseVO.applyId.notNull}")
    private Long applyId;

    @Schema(description = "联合国危险品编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoDgBaseVO.unNo.notBlank}")
    @Length(max = 4, message = "{SpecialCargoDgBaseVO.unNo.notBlank}")
    private String unNo;

    @Schema(description = "国际海事局危险品分类", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoDgBaseVO.imoClass.notBlank}")
    @Length(max = 4, message = "{SpecialCargoDgBaseVO.imoClass.length}")
    private String imoClass;

    @Schema(description = "正确运输名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoDgBaseVO.psn.notBlank}")
    @Length(max = 256, message = "{SpecialCargoDgBaseVO.psn.length}")
    private String psn;

    @Schema(description = "包装组别", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoDgBaseVO.packingGroup.notBlank}")
    @Length(max = 50, message = "{SpecialCargoDgBaseVO.packingGroup.length}")
    private String packingGroup;

    @Schema(description = "技术名称", example = "赵六")
    @Length(max = 500, message = "{SpecialCargoDgBaseVO.technicalName.length}")
    private String technicalName;

    @Schema(description = "副危险")
    private String subsidiaryRisk;

    @Schema(description = "是否数量限制", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoDgBaseVO.limitedQty.notNull}")
    private Boolean limitedQty;

    @Schema(description = "海污", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoDgBaseVO.marinePollutant.notNull}")
    private Boolean marinePollutant;

    @Schema(description = "货物状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{SpecialCargoDgBaseVO.cargoStatus.notBlank}")
    @Length(max = 20, message = "{SpecialCargoDgBaseVO.cargoStatus.length}")
    private String cargoStatus;

    @Schema(description = "应急反应措施编号")
    private String emsNo;

    @Schema(description = "危险品货物毛重", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoDgBaseVO.dgGrossWgt.notNull}")
    private BigDecimal dgGrossWgt;

    @Schema(description = "危险品货物净重", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{SpecialCargoDgBaseVO.dgNetWgt.notNull}")
    private BigDecimal dgNetWgt;

    @Schema(description = "医疗急救指南编号")
    @Length(max = 20, message = "{SpecialCargoDgBaseVO.mfagNo.length}")
    private String mfagNo;

    @Schema(description = "紧急应变指南编号")
    @Length(max = 20, message = "{SpecialCargoDgBaseVO.erg.length}")
    private String erg;

    @Schema(description = "隔离组")
    @Length(max = 100, message = "{SpecialCargoDgBaseVO.segregationGroup.length}")
    private String segregationGroup;

    @Schema(description = "闪点")
    private BigDecimal flashPoint;

    @Schema(description = "电池状态", example = "2")
    @Length(max = 64, message = "{SpecialCargoDgBaseVO.batteryStatus.length}")
    private String batteryStatus;

    @Schema(description = "爆炸物含量")
    private BigDecimal netExplosiveWgt;

    @Schema(description = "紧急联系人名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoDgBaseVO.emergencyContactName.notBlank}")
    @Length(max = 50,message = "{SpecialCargoDgBaseVO.emergencyContactName.length}")
    private String emergencyContactName;

    @Schema(description = "紧急联系人地址", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoDgBaseVO.emergencyContactAddress.notBlank}")
    @Length(max = 50,message = "{SpecialCargoDgBaseVO.emergencyContactAddress.length}")
    private String emergencyContactAddress;

    @Schema(description = "紧急联系人电话", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{SpecialCargoDgBaseVO.emergencyContactMobile.notBlank}")
    @Length(max = 50,message = "{SpecialCargoDgBaseVO.emergencyContactMobile.length}")
    private String emergencyContactMobile;

    @Schema(description = "紧急联系人邮箱")
    @Length(max = 50,message = "{SpecialCargoDgBaseVO.emergencyContactEmail.length}")
    private String emergencyContactEmail;

    @Schema(description = "紧急联系人传真")
    @Length(max = 50,message = "{SpecialCargoDgBaseVO.emergencyContactFax.length}")
    private String emergencyContactFax;

    private HashMap<String,String> dgExt;

    @Schema(description = "dg内包装信息")
    private List<PackingCreateOrUpdateVO> innerDgPacking;

    @Schema(description = "dg外包装信息")
    private List<PackingCreateOrUpdateVO> outerDgPacking;

    @Schema(description = "dgCAS信息")
    private List<CasCreateOrUpdateVO> dgCasInfo;

}
